package net.zjitc.doubao_community_backed.controller;/**
 * @Author 董熠涛
 * @Date 2025/6/19  1:00
 */

import jakarta.annotation.Resource;
import net.zjitc.doubao_community_backed.api.ApiResult;
import net.zjitc.doubao_community_backed.model.entity.BmsTip;
import net.zjitc.doubao_community_backed.service.IBmsTipService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:董熠涛
 * @ 2025/6/191:00
 */
@RestController
@RequestMapping("/tip")
public class BmsTipController  {
    @Resource
    private IBmsTipService bmsTipService;

    @GetMapping("/today")
    public ApiResult<BmsTip> getRandomTip() {
        BmsTip tip = bmsTipService.getRandomTip();
        System.out.println(tip);
        return ApiResult.success(tip);
    }
}
